package com.zys.sac.core.constant;

/**
 * 请求状态码枚举
 *
 * Created by zhongjunkai on 2022/3/15.
 */
public enum RequestStatus {
    GENERALSUCCESS("99", "访问成功"),
    GENERALFAIL("500", "访问失败"),
    DENIED("10001", "拒绝访问"),
    FAILURE("10002", "认证失败"),
    SUCCESS("10000", "认证成功"),
    LOGINREDIRECT("10403", "登录重定向，请使用获取到的token进行登录"),
    LOGOUTSUCCESS("10003", "登出成功"),
    UNAUTHORIZATION("10099", "未授权"),
    INVALIDURL("10088", "权限未进行配置"),
    NOURL2ROLE("10087", "权限未配置对应角色"),
    INVALIDTOKEN("10021", "非法的token值"),
    TOKENEMPTY("10022", "token不能为空"),
    USEREMPTY("10023", "当前用户未登录"),
    VERIFYERROR("10050", "验证码异常"),
    VERIFYEMPTY("10051", "验证码不能为空")
    ;

    private String code;

    private String msg;

    RequestStatus(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
